There is a known current detector that measures a current flowing through a current line. The current detector is designed to detect a magnetic field generated by a current with a magnetic sensor and thereby to measure the current amount based on an output from a magnetic sensor (for example, Patent Document 1). Magnetic sensors suitable for use in such a current detector can employ magnetoresistive effect elements (MR elements), such as a giant magnetoresistive effect (GMR element) and a tunnel magnetoresistive effect element (TMR element). Two MR elements are connected in series with a voltage applied to both ends thereof, and then a potential (output potential) between the two MR elements is measured, so that the magnitude of a magnetic field, applied to the MR elements, can be detected.
A MR element, such as the GMR or TMR element, has extremely high sensibility, making it possible to measure a minute magnetic field, or a minute change in a magnetic field induced by the use of a minute current. Meanwhile, these MR elements are also susceptible to a disturbance magnetic field, such as a magnetic field generated by geomagnetism or electronic devices. Thus, to accurately measure the magnetic field using the magnetic sensor via the MR element, it is necessary to suppress the effect of any disturbance magnetic field. Specifically, for instance, a magnetic shield can be provided to cover the MR element, thereby suppressing the effect of a disturbance magnetic field on the MR element.
However, the provision of a magnetic shield leads to an increase in the number of parts of the magnetic sensor, and thereby an increase in the overall manufacturing cost of the magnetic sensor. Furthermore, the size of the magnetic sensor possibly increases after the magnetic shield is provided. In particular, if a measurement current is large when assembling the magnetic sensor in a current detector, a small-sized magnetic shield might be magnetic-saturated. This requires a large-sized magnetic shield. Consequently, the magnetic sensor will become much larger.
To reduce the cost and size of the magnetic sensor, it is desired to eliminate the magnetic shield. For this reason, methods for arranging MR elements have been studied that can suppress the effect of any disturbance magnetic field on the MR elements.
Patent Document 1 discloses a current detector that can suppress the effect of any disturbance magnetic field. A magnetic sensor includes four MR elements. Two of these MR elements are connected in series to configure a first half-bridge circuit. Likewise, the remaining two MR elements are also connected in series to configure a second half-bridge circuit. The first half-bridge circuit and the second half-bridge circuit are connected in parallel with each other to thereby configure a bridge circuit. The magnetosensitive direction (magnetization direction of a fixed layer) of each MR element in the first half-bridge circuit is aligned with the magnetosensitive direction of each MR element in the second half-bridge circuit, so that the effects of the disturbance magnetic field on the respective half-bridge circuits can be equalized. Thus, a difference (differential output) between an output potential in the first half-bridge circuit and an output potential in the second half-bridge circuit is taken out, and thereby the effect of the disturbance magnetic field on the respective half-bridge circuits can be offset.
As the MR element includes a free layer, a bias magnetic field can be applied to the MR element to improve the accuracy of the measurement. In the technique mentioned in Patent Document 1, to apply bias magnetic fields to the respective MR elements, a hard bias layer formed of a ferromagnetic material is disposed at both sides of each MR element.